package com.gurid.service.edu.feign.fallback;

import com.gurid.common.base.result.R;
import com.gurid.service.edu.feign.VodMediaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 熔断降级，假如视频删除失败，则返回R.error但是讲师还是会删除，不至于服务整个down
 */
@Service
@Slf4j
public class VodMediaServiceFallback implements VodMediaService {
    @Override
    public R removeVideo(String vodId) {
        log.info("熔断保护");
        return R.error();
    }

    @Override
    public R removeVideoByIdList(List<String> videoIdList) {
        log.info("熔断保护");
        return R.error();
    }
}
